import request from "@/utils/request";

/**
 * @function 获取列表数据
 * **/
export const listApi = () => {
  return request.get('/sys/dept/list')
}

/**
 * @function 创建部门
 * **/
export const createApi = (data) => {
  return request.post('/sys/dept', data)
}

/**
 * @function 获取部门详情
 * **/
export const getInfoApi = (id) => {
  return request.get(`/sys/dept/${id}`)
}

/**
 * @function 更新部门
 * **/
export const updataApi = (data) => {
  return request.put('/sys/dept', data)
}

/**
 * @function 删除部门
 * **/
export const deleteApi = (id) => {
  return request.delete(`/sys/dept/${id}`)
}